'''
常用的控制浏览器的方法：
back()
forward()
refresh()
minimize_window()
maximize_window()

'''
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options
from service import service

dr=webdriver.Chrome(options=options,service=service)
dr.get(r'https://www.baidu.com/')
dr.get(r'https://news.baidu.com/')
# dr.find_element(By.ID,'kw').send_keys('aaa')
dr.back()
sleep(1)
dr.forward()
sleep(1)
dr.refresh()
sleep(1)
dr.minimize_window()
sleep(1)
dr.maximize_window()  # 常用
sleep(1)
dr.set_window_size(900, 600)
sleep(1)
print(dr.get_window_size())
sleep(1)

dr.quit()

